import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm'
import { App } from 'src/app.entity'
@Entity()
export class Menu extends App {
  @Column({ type: 'varchar', length: 10 })
  name: string
  @Column({ type: 'varchar', length: 60 })
  path: string
  @ManyToOne(() => Menu)
  @JoinColumn({ name: 'parent_id' })
  parent: Menu
  @Column({ type: 'enum', enum: [true, false], default: false })
  isFather: boolean
  @Column({ type: 'varchar', length: 50, nullable: true })
  desc?: string
}
